1. Field of the Invention
The present invention relates to an information processing apparatus and a computer program product.
2. Description of the Related Art
A printer driver for Windows (registered trademark) has a system of PrintTicket. The PrintTicket is a system that enables an application to directly change a function unique to a vendor.
Conventionally, information (hereinafter, referred to as print setting information) used to control a printer has been exchanged between an application and a printer driver with a structure called DEVMODE. The print setting information includes information indicating how to print (the number of copies, the number of pages per sheet, presence of staple, and the like). For example, when the number of copies is set to be two, the number of copies that is two is input to the print setting information so as to execute printing.
DEVMODE is divided into a public area and a private area. Basic functions that are common among vendors are previously defined in the public area and definitions of the functions have been publicized. Since information of the public area has been publicized as described, settings in the public area can be changed by an application. Representative functions included in the public area are the number of copies, printing direction, and the like.
On the other hand, the private area is an area that can be originally defined by a vendor and functions unique to the vendor are defined in the private area. In general, information of the private area is not publicized. Therefore, an application cannot directly change the settings of the functions in the private area (functions unique to the vendor). As a method of changing the settings of the functions unique to the vendor, which are defined in the private area, a method in which a user changes the settings on a print setting screen provided by a printer driver is generally employed.
Accordingly, when the DEVMODE is used as print setting information, it is difficult to change a function unique to a vendor to a specific set value to execute printing without operation on a print setting screen by a user. For example, since the number of copies is a function defined in the public area of the DEVMODE, an application that causes to perform “always printing two copies of specified documents” can be realized. On the other hand, it is difficult to realize an application that causes to perform “forcibly changing a setting of a specific function defined in the private area to execute printing”.
The settings in the private area of the DEVMODE can be operated through an application by using PrintTicket as print setting information. The PrintTicket is print setting information in an XML format. With the PrintTicket, the settings of functions unique to the vendor, which are hidden in the private area in a case of a DEVMODE format, is publicized to the application. The application operates print setting with the print setting information in the XML format (XML print setting information) to make the printer driver convert the set print setting information to DEVMODE. With this, the private area of the DEVMODE can be operated.
For example, when a staple function is forcibly made to be in an ON state by the application, the application generates PrintTicket (XML print setting information) including information indicating that the staple function is in the ON state and requests the driver to convert the generated PrintTicket to DEVMODE. The printer driver decodes information of the PrintTicket, changes the setting of the staple defined in the private area of the DEVMODE to be in the ON state, and returns the DEVMODE to the application. The application executes printing by using the DEVMODE, so that printing can be performed while setting the staple function to be in the ON state.
In Japanese Patent Application Laid-open No. 2009-064415, the following technique is proposed: A printer driver is made to store information (PrintCapabilities) indicating performance of a device to be controlled; When receiving a instruction to use a specified PrintTicket for controlling the device, the printer driver reflects contents of the PrintTicket onto setting contents used to control the device. With this technique, contents of setting performed by using a specific device driver can be easily and appropriately utilized even when another device driver is used.
When a new function emerges and is added to a printer with a plug-in or the like or when a set value of a function is added or modified, a function name or a set value in the PrintTicket is also needed to be added or modified. That is to say, the function name and the set value that are defined in the PrintTicket are susceptible to addition or change of the function of the printer.
However, since a module that controls PrintTicket is generally in a binary format, there arises is a problem that, when a function name and a set value that are defined in the PrintTicket are modified, the module has to be recompiled.